<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    function register(nowThis) {
    //在线报名
    qk_dialog()
    if ($(nowThis).attr("issignup") == "true") {
        qk_dialog("曾经何时，您已经报名成功咯哟！");
    } else {
        var name = $("#userName").val();
        var tel = $("#userTel").val();
        var qq = $("#userQQ").val() == undefined ? "" : $("#userQQ").val();
        var address = $("#userAddress").val() == undefined ? "" : $("#userAddress").val();
        var remarks = $("#remarks").val() == undefined ? "" : $("#remarks").val();
        var major = $("#major").val() == undefined ? "" : $("#major").val();
        var source = $("#source_page").val() == undefined ? "官网" : $("#source_page").val();
        if (name == "" || name == undefined || tel == "" || tel == undefined) { qk_dialog("输入姓名和电话不能为空！"); qk_dialog_close(3); ; return; }
        $.post("/PC_Mould_Page/handle/OnLineRegister.ashx", { requesttype: "OnLineRegister", userName: name, userTel: tel, userQQ: qq, userAddress: address, Major: major, Remarks: remarks, SourcePage:source }, function (returnVal) {

            var regx = /<count>(.*)<\/count><error_code>(.*)<\/error_code><error_meg>(.*)<\/error_meg>/;
            var count = parseInt(returnVal.match(regx)[1]);
            var errorCode = returnVal.match(regx)[2];
            var errorMeg = returnVal.match(regx)[3];
            if (errorCode == "0") {
                qk_dialog(errorMeg);
                //nowThis.disabled = "disabled"
                $(nowThis).attr("issignup", "true");
            } else {
                qk_dialog(errorMeg);
            }
            qk_dialog_close(3);


        })
    }

}
</script>
</html>